package com.model.责任链;

class  Client {
    public static void main(String[] args) {
        // 构建责任链
        Handler junior = new JuniorManager();
        Handler senior = new SeniorManager();
        Handler director = new Director();

        junior.setNext(senior);
        senior.setNext(director);

        // 模拟不同金额的请求
        junior.handleRequest(new Request(800, "Office supplies"));
        junior.handleRequest(new Request(3000, "Team building"));
        junior.handleRequest(new Request(8000, "New equipment"));
        junior.handleRequest(new Request(15000, "Annual conference"));
    }
}

